<? include $_SERVER['DOCUMENT_ROOT'].'/fr/include/connexion.php';
if($_POST['q']=="delete"){
	mysql_query("DELETE FROM `produit` WHERE pro_id = '".$_POST['sel_id']."';");
}

?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<title>Herbes de Chine</title>
		<link href="/fr/css/common.css" rel="stylesheet" type="text/css" />
		<link href="/fr/css/inside.css" rel="stylesheet" type="text/css" />
		<link href="/fr/css/admin.css" rel="stylesheet" type="text/css" />
	</head>
	<body>
		﻿<div id="header">
			<table id="top">
				<tr>
					<td id="logo" rowspan="2"><a href="/fr/index.php"><img src="/img/common/header/logo.gif" alt="Herbes de Chine" /></a></td>
					<td id="connexion"></td>
				</tr>
				<tr>
					<td id="cart"></td>
				</tr>
			</table>
		</div>
		<div id="tools">
			<table>
				<tr>
					<td id="title">Supprimer un produit</td>
					<? include $_SERVER['DOCUMENT_ROOT']."/fr/admin/nav.php"; ?>
				</tr>
			</table>
		</div>
		<td id="search">
		    <table id="body" class="widescreen">
				<tr class="top"><td colspan="2"></td></tr>
			    <tr class="middle"><td class="content">
					<div id="form" class="double"><form name="form" action="?" method="POST"><input type="hidden" name="q" value="delete" />
						<table class="clear">
							<tr><td colspan="2">&nbsp;</td></tr>
							<tr>
								<td width="130">Référence</td>
								<td><select name="sel_id"><option></option>
								<?
								$q2 = mysql_query("SELECT * FROM produit");
								while ($r2 = mysql_fetch_array($q2) ){
									if($_GET['id']==$r2['pro_id']){
										$s = "selected";
									} else {
										$s = "";
									}
									echo "<option value='".$r2['pro_id']."' $s>".$r2['pro_id']." - ".$r2['pro_nom']."</option>";
								}
								?>
								</select> <input type="submit" value="Supprimer" /></td>
							</tr>
							<tr><td colspan="2">&nbsp;</td></tr>
						</table>
					</form></div>
				</td></tr>
				<tr class="bottom"><td colspan="2"></td></tr>
			</table>﻿
		</div>
	</body>
</html>
